package com.dlplay.flightinfo.core;

import java.util.Date;
import java.util.List;

import com.dlplay.flightinfo.data.AirFlightCode;
import com.dlplay.flightinfo.data.CityCode;
import com.dlplay.flightinfo.data.EMailRegister;
import com.dlplay.flightinfo.data.FlightInfo;
import com.dlplay.flightinfo.data.RealTimeFlightInfo;

public interface FlightManager {

	/**
	 * @param flightNumber
	 * @return if no found, return null
	 * Description: find the flight information by the flight number in date
	 */
	public abstract FlightInfo getFlightInfo(AirFlightCode flightNumber, Date date);
	
	/**
	 * @param flightNumber
	 * @return if no found, return null
	 * Description: find the flight information by the flight number in today
	 */
	public abstract FlightInfo getFlightInfo(AirFlightCode flightNumber);
	
	/**
	 * @param flightNumber
	 * @return if no found, return null
	 * Description: search the flight information by from and to in today
	 */
	public abstract List<FlightInfo> searchFlightInfo(CityCode from, CityCode to, Date date);			

	/**
	 * @param flightNumber
	 * @return if no found, return null
	 * Description: search the flight information by from and to in date
	 */
	public abstract List<FlightInfo> searchFlightInfo(CityCode from, CityCode to);				

	/**
	 * @param flightNumber
	 * @return if no found, return null
	 * Description: find the real-time flight information by the flight number in today
	 */
	public abstract RealTimeFlightInfo getRealTimeFlightInfo(AirFlightCode flightNumber);		

	/**
	 * @param user
	 * @param flightNum
	 * @param email
	 * @return if success, return true. otherwise return false
	 * Description: register a email notification, when the flight is changed
	 */
	public abstract boolean registerEmail(String user, AirFlightCode flightNum, String email);
		
}